Offering database functionality as a service (referred to “software as a service”) requires implementing multi-tenancy within a physical database. Multi-tenancy data can be hosted to provide varying degrees of access via different applications that can range from isolated to shared, for example. Thus, in an isolated environment, tenants are isolated from each other in logical databases. As the logical databases grow in size, or the workload patterns change, this optimal number can change. It therefore becomes desirable to optimize the number and size of logical databases per physical server.